#include <stdio.h>
#include "manager_lib.h"
int main(void)
{
	char name[20] = {'\0'};
	char phone[20] = {'\0'};
	char address[20] = {'\0'};
	char temp[] = {'\0'};
	int action = 0;
	while(1)
	{
		printf("input your action:");
		scanf("%d",&action);
		while(getchar() != '\n'){};
		switch(action)
		{
			case 1:
				printf("input your name phone address:");
				scanf("%s %s %s",name,phone,address);
				add(name,phone,address);
				break;
			case 2:
				printf("search user by name\ninput your name:");
				scanf("%s",temp);
				find_user_by_name(temp);
				break;
			case 3:
				print_all();
				break;
			default:
				printf("wrong action!\n");
				break;
		}
		action = 0;
		while(getchar() != '\n'){};
	}
	return 0;
	
	return 0;
}
